<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      div {
        width: 300px;
        height: 40px;
        background-color: pink;
        overflow: hidden;
        text-overflow: ellipsis;

        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        line-clamp: 2;
      }
    </style>
  </head>
  <body>
    <div>
      <p>some text... ...</p>
    </div>
    <script>
      var quickSort = function(arr) {
        if (arr.length <= 1) {
          return arr
        }

        var pivotIndex = Math.floor(arr.length / 2)

        var pivot = arr.splice(pivotIndex, 1)[0]

        var left = []

        var right = []

        for (var i = 0; i < arr.length; i++) {
          if (arr[i] < pivot) {
            left.push(arr[i])
          } else {
            right.push(arr[i])
          }
        }

        return quickSort(left).concat([pivot], quickSort(right))
      }
      console.log(quickSort([85, 24, 63, 45, 17, 31, 96, 50]))
    </script>
  </body>
</html>
